package com.puti.doctor.service.impl;

import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.puti.doctor.mapper.GoodsOrderMapper;
import com.puti.doctor.domian.GoodsOrder;
import com.puti.doctor.service.IGoodsOrderService;

/**
 * 商品-订单 商品-订单Service业务层处理
 * 
 * @author puti
 * @date 2021-04-23
 */
@Service
public class GoodsOrderServiceImpl implements IGoodsOrderService 
{
    @Autowired
    private GoodsOrderMapper goodsOrderMapper;




    /**
     * 查询商品-订单 商品-订单
     * 
     * @param orderId 商品-订单 商品-订单ID
     * @return 商品-订单 商品-订单
     */
    @Override
    public GoodsOrder selectGoodsOrderById(String orderId)
    {
        return goodsOrderMapper.selectGoodsOrderById(orderId);
    }

    /**
     * 查询商品-订单 商品-订单列表
     * 
     * @param goodsOrder 商品-订单 商品-订单
     * @return 商品-订单 商品-订单
     */
    @Override
    public List<GoodsOrder> selectGoodsOrderList(GoodsOrder goodsOrder)
    {
        return goodsOrderMapper.selectGoodsOrderList(goodsOrder);
    }

    /**
     * 新增商品-订单 商品-订单
     * 
     * @param goodsOrder 商品-订单 商品-订单
     * @return 结果
     */
    @Override
    public int insertGoodsOrder(GoodsOrder goodsOrder)    {
        return goodsOrderMapper.insertGoodsOrder(goodsOrder);
    }

    /**
     * 修改商品-订单 商品-订单
     * 
     * @param goodsOrder 商品-订单 商品-订单
     * @return 结果
     */
    @Override
    public int updateGoodsOrder(GoodsOrder goodsOrder)
    {
        return goodsOrderMapper.updateGoodsOrder(goodsOrder);
    }

    /**
     * 批量删除商品-订单 商品-订单
     * 
     * @param orderIds 需要删除的商品-订单 商品-订单ID
     * @return 结果
     */
    @Override
    public int deleteGoodsOrderByIds(String[] orderIds)
    {
        return goodsOrderMapper.deleteGoodsOrderByIds(orderIds);
    }


    /**
     * 删除商品-订单 商品-订单信息
     * 
     * @param orderId 商品-订单 商品-订单ID
     * @return 结果
     */
    @Override
    public int deleteGoodsOrderById(String orderId)
    {
        return goodsOrderMapper.deleteGoodsOrderById(orderId);
    }

    @Override
    public List findAll(Date startTime, Date endTime) {
        return goodsOrderMapper.findAll(startTime, endTime);
    }


}
